/**
 * @Author: ${userName}
 */
@Slf4j
@Service
public class Api${tableToJavaBean}ServiceImpl implements Api${tableToJavaBean}Service {

	@Autowired
    private ${tableToJavaBean}Service ${tableToJavaBeanLF}Service;

    @Override
    public JlPage<${tableToJavaBean}VO> pageList(${tableToJavaBean}QueryBO bo) {
        JlPage<${tableToJavaBean}VO> res = JlPage.execute(${tableToJavaBean}VO.class,
                bo.getPage(), bo.getPageSize(),
                () -> {
                    LambdaQueryWrapper<${tableToJavaBean}> ew = new LambdaQueryWrapper<>();
                    List<${tableToJavaBean}> list = ${tableToJavaBeanLF}Service.list(ew);
                    return list.stream().map(${tableToJavaBean}VO::new).collect(Collectors.toList());
                });
        return res;
    }

    @Override
    public ${tableToJavaBean}VO getById(String id) {
        ${tableToJavaBean} res = ${tableToJavaBeanLF}Service.getById(id);
        return new ${tableToJavaBean}VO(res);
    }

    @Override
    @Transactional
    public void add(${tableToJavaBean}FormBO bo) {
        ${tableToJavaBean} ${tableToJavaBeanLF} = new ${tableToJavaBean}();
        BeanUtils.copyProperties(bo,${tableToJavaBeanLF});
        ${tableToJavaBeanLF}Service.save(${tableToJavaBeanLF});
    }

    @Override
    @Transactional
    public void update(${tableToJavaBean}FormBO bo) {
        ${tableToJavaBean} ${tableToJavaBeanLF} = new ${tableToJavaBean}();
        BeanUtils.copyProperties(bo,${tableToJavaBeanLF});
        ${tableToJavaBeanLF}Service.updateById(${tableToJavaBeanLF});
    }

    @Override
	@Transactional
    public void delByIds(List<String> ids) {
        for (String id : ids) {
            ${tableToJavaBeanLF}Service.removeById(id);
        }
    }
}